package org.mics.sitemsg.repository;

import org.mics.jpa.repository.BaseRepository;
import org.mics.sitemsg.entity.SiteMsgDO;
import org.mics.sitemsg.enums.SiteMsgState;
import org.springframework.stereotype.Repository;

/**
 * 站内信
 * @author mics
 * @date 2021-11-8
 * @version  1.0
 */
@Repository
public interface SiteMsgRepository extends BaseRepository<SiteMsgDO>{

	/**
	 * 查询用户未读站内信数量
	 * @author mics
	 * @date 2022-8-16
	 * @version  1.0
	 * @param userId
	 * @param notRead
	 */
	long countByReceiveUserIdAndState(String userId, SiteMsgState notRead);

}
